package com.dreamder.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "T_DRD_DENUNCIA")
@SequenceGenerator(name = "denunciaSeq", sequenceName = "SEQ_DRD_DENUNCIA", allocationSize = 1)
public class Denuncia implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 7846681627916286659L;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "denunciaSeq")
	@Column(name = "id_denuncia")
	private Long id;
	
	@Column(name = "ds_denuncia", nullable=false, length=255)
	private String descricao;
	
	@ManyToOne
	@JoinColumn(name="id_sonho")
	private Sonho sonho;
	
	@ManyToOne
	@JoinColumn(name="id_usuario")
	private Usuario relator;
	
	public Denuncia() {
	}
	
	public Denuncia(String descricao, Sonho sonho, Usuario relator) {
		this.descricao = descricao;
		this.sonho = sonho;
		this.relator = relator;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the descricao
	 */
	public String getDescricao() {
		return descricao;
	}

	/**
	 * @param descricao the descricao to set
	 */
	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	/**
	 * @return the sonho
	 */
	public Sonho getSonho() {
		return sonho;
	}

	/**
	 * @param sonho the sonho to set
	 */
	public void setSonho(Sonho sonho) {
		this.sonho = sonho;
	}

	/**
	 * @return the relator
	 */
	public Usuario getRelator() {
		return relator;
	}

	/**
	 * @param relator the relator to set
	 */
	public void setRelator(Usuario relator) {
		this.relator = relator;
	}

}
